import path from 'path'
import dts from 'rollup-plugin-dts'
import ts from 'rollup-plugin-typescript2'
export default [
	{
		input: './src/core/index.ts',
		output: [
			{
				// 打包esmodule
				file: path.resolve(__dirname, './dist/index.esm.js'),
				format: 'es'
			},
			{
				// 打包cjs
				file: path.resolve(__dirname, './dist/index.cjs.js'),
				format: 'cjs'
			},
			{
				// 打包umd
				file: path.resolve(__dirname, './dist/index.js'),
				format: 'umd',
				name: 'Bpoint'
			}
		],
		plugins: [ts()]
	},
	{
		// 输出.d.ts
		input: './src/core/index.ts',
		output: [
			{
				file: path.resolve(__dirname, './dist/index.d.ts'),
				format: 'es'
			}
		],
		plugins: [dts()]
	}
]
